Provide GitHub Actions pinning#43
Conversation
📝 WalkthroughWalkthroughSwitches the Nix formatter from ChangesCI Tooling and Security Hardening
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 26-29: Replace the floating `@main` references with immutable commit
SHAs for all three DeterminateSystems actions: nix-installer-action,
flakehub-cache-action, and flake-checker-action. For each action, change the
`@main` tag to a specific commit SHA (format `@abc123`...) to ensure reproducibility
and strengthen supply-chain integrity. Look up the current stable commit hash
for each action and apply it consistently across all three uses directives.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 37a9252a-40c0-4065-aa57-e027ad545da2
⛔ Files ignored due to path filters (1)
flake.lockis excluded by!**/*.lock
📒 Files selected for processing (6)
.github/dependabot.yml.github/workflows/ci.yml.github/workflows/publish.yml.github/zizmor.ymlflake.nixnix/check.nix
| - uses: DeterminateSystems/nix-installer-action@main | ||
| - uses: DeterminateSystems/flakehub-cache-action@main | ||
| - name: Check Nixpkgs input | ||
| uses: DeterminateSystems/flake-checker-action@main |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== Non-SHA action refs =="
rg -nP '^\s*-\s*uses:\s*[^@]+@(?![0-9a-f]{40}\b)' .github/workflows
echo "== Floating `@main` refs =="
rg -nP '^\s*-\s*uses:\s*[^@]+@main\b' .github/workflowsRepository: DeterminateSystems/detsys-ids-client
Length of output: 482
🏁 Script executed:
cd .github/workflows && sed -n '24,32p' ci.ymlRepository: DeterminateSystems/detsys-ids-client
Length of output: 386
Pin DeterminateSystems actions to immutable commit SHAs.
Lines 26-29 still use floating @main refs for all three DeterminateSystems actions (nix-installer-action, flakehub-cache-action, and flake-checker-action), which weakens supply-chain integrity and reproducibility compared to SHA pinning.
Suggested change
- - uses: DeterminateSystems/nix-installer-action@main
- - uses: DeterminateSystems/flakehub-cache-action@main
+ - uses: DeterminateSystems/nix-installer-action@<40-char-commit-sha>
+ - uses: DeterminateSystems/flakehub-cache-action@<40-char-commit-sha>
- name: Check Nixpkgs input
- uses: DeterminateSystems/flake-checker-action@main
+ uses: DeterminateSystems/flake-checker-action@<40-char-commit-sha>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ci.yml around lines 26 - 29, Replace the floating `@main`
references with immutable commit SHAs for all three DeterminateSystems actions:
nix-installer-action, flakehub-cache-action, and flake-checker-action. For each
action, change the `@main` tag to a specific commit SHA (format `@abc123`...) to
ensure reproducibility and strengthen supply-chain integrity. Look up the
current stable commit hash for each action and apply it consistently across all
three uses directives.
Summary by CodeRabbit